using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ObstacleMove : MonoBehaviour
{
    float _ObsPosition;
    private void Start()
    {
        _ObsPosition = Random.Range(-9.5f, 9.5f);
    }
    private void FixedUpdate()
    {
        if (_ObsPosition <= transform.position.x) 
        {
            transform.position = new Vector3(Mathf.Round(transform.position.x) - 1.5f, transform.position.y, 0);
        }
    }
}
